<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <form action="" name="com">
        <input type="text" name="num1" id="num1" value="">
        <select name="yunsuan" id="">
            <option value=""></option>
            <option value="">+</option>
            <option value="">-</option>
            <option value="">*</option>
            <option value="">/</option>
        </select>
        <input type="text" name="num2" id="num1" value="">
        结果：<input type="text" name="result" id="result" value="">
        <button type="button" onclick="count()">提交</button>
    </form>
</body>
<script type="text/javascript">
  function count(){
      var yunsuan = document.com.yunsuan.value
      var num11 = document.num11.value
      var num22 = document.num22.value
      var yunsuan
      var num1=parseFloat(num11)
      var num2=parseFloat(num22)
      var aa
   
  }
     switch (yunsuan) {
      case '+':
          result = num11+num22
          break;
        case '-':
          result = num11-num22
          break;
        case '*':
           result = num11*num22
           break;
        case '/':
           result = num11/num22
           break;
      default:
           result=('输入错误')
          break;
  }
  document.com.result.value=result
 
</script>
</html>